Skip to content

🌱 Upgrade to Go 1.25.0#1296

Merged
openshift-merge-bot[bot] merged 1 commit intoopen-cluster-management-io:mainfrom
haoqing0110:br_golang25
Dec 16, 2025
Merged

🌱 Upgrade to Go 1.25.0#1296
openshift-merge-bot[bot] merged 1 commit intoopen-cluster-management-io:mainfrom
haoqing0110:br_golang25

Conversation

@haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Dec 12, 2025

Summary

Upgrade Go version from 1.24.0 to 1.25.0 across the entire codebase.

Changes

This PR updates the Go version to 1.25.0 in the following locations:

GitHub Actions Workflows (5 files)

  • .github/workflows/cloudevents-integration.yml
  • .github/workflows/e2e.yml
  • .github/workflows/post.yml
  • .github/workflows/pre.yml
  • .github/workflows/releaseimage.yml

Dockerfiles (5 files)

  • build/Dockerfile.addon
  • build/Dockerfile.placement
  • build/Dockerfile.registration
  • build/Dockerfile.registration-operator
  • build/Dockerfile.work

Go Module

  • go.mod - Updated Go directive from 1.24.0 to 1.25.0

Documentation

  • development.md - Updated prerequisite and technology references

Related Issues

Part of the ongoing effort to keep OCM dependencies up to date.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Go language version upgraded from 1.24 to 1.25 across all workflows and build configurations
    • Open Cluster Management module dependencies updated to latest versions
    • Docker base images updated to reflect toolchain changes

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci openshift-ci bot requested review from deads2k and qiujian16 December 12, 2025 07:57
@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Walkthrough

This pull request upgrades Go from version 1.24 to 1.25 across the project. Changes include updating GO_VERSION environment variables in GitHub workflows, updating Dockerfile base images from golang:1.24-bullseye to golang:1.25-bookworm, bumping the go toolchain in go.mod to 1.25.0, updating three Open Cluster Management module dependencies to newer versions, refreshing documentation version references, and updating ClusterServiceVersion timestamps.

Changes

Cohort / File(s) Change Summary
GitHub Workflows (GO_VERSION updates)
.github/workflows/cloudevents-integration.yml, .github/workflows/e2e.yml, .github/workflows/post.yml, .github/workflows/pre.yml, .github/workflows/releaseimage.yml
Updated GO_VERSION environment variable from 1.24 to 1.25 across all workflow files; no changes to workflow logic or steps.
Dockerfile Base Images
build/Dockerfile.* (addon, placement, registration, registration-operator)
Updated builder stage base image from golang:1.24-bullseye to golang:1.25-bookworm; all subsequent build steps and final stages remain unchanged.
Go Toolchain and Dependencies
go.mod
Bumped Go toolchain from 1.24.0 to 1.25.0; updated three Open Cluster Management module dependencies (addon-framework, api, sdk-go) to newer pseudo-version tags with 2025-12-16 timestamps.
Documentation
development.md
Updated Go language version references from 1.24.0 to 1.25.0 in Key Technologies and Prerequisites sections.
ClusterServiceVersion Manifests
deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml, deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml
Updated createdAt timestamps from 2025-12-15T05:30:24Z to 2025-12-16T09:07:02Z; no other structural or specification changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify Go 1.25 compatibility: Ensure all components build and function correctly with Go 1.25.
  • OCM dependency updates: Confirm that the updated addon-framework, api, and sdk-go dependencies are stable and tested versions.
  • Dockerfile base image transition: Validate that golang:1.25-bookworm is compatible with all build configurations across addon, placement, registration, and registration-operator images.

Possibly related PRs

  • ocm#1085: Performs the same type of Go version upgrade pattern across workflows, Dockerfiles, and go.mod.
  • ocm#1216: Updates go.mod dependencies and modifies ClusterServiceVersion timestamps in the same manifest files.
  • ocm#1286: Upgrades the open-cluster-management.io/sdk-go dependency in go.mod.

Suggested labels

lgtm, approved

Suggested reviewers

  • deads2k
  • qiujian16

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely communicates the main change: upgrading Go to version 1.25.0 across the codebase.
Description check ✅ Passed The description includes a summary and detailed list of changes across workflows, dockerfiles, modules, and docs, but lacks the 'Related issue(s)' section specified in the template.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bbb5ced and 950b751.

⛔ Files ignored due to path filters (3)
  • build/Dockerfile.work is excluded by !**/*.work
  • go.sum is excluded by !**/*.sum
  • vendor/modules.txt is excluded by !vendor/**
📒 Files selected for processing (13)
  • .github/workflows/cloudevents-integration.yml (1 hunks)
  • .github/workflows/e2e.yml (1 hunks)
  • .github/workflows/post.yml (1 hunks)
  • .github/workflows/pre.yml (1 hunks)
  • .github/workflows/releaseimage.yml (1 hunks)
  • build/Dockerfile.addon (1 hunks)
  • build/Dockerfile.placement (1 hunks)
  • build/Dockerfile.registration (1 hunks)
  • build/Dockerfile.registration-operator (1 hunks)
  • deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml (1 hunks)
  • deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml (1 hunks)
  • development.md (2 hunks)
  • go.mod (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • .github/workflows/cloudevents-integration.yml
  • build/Dockerfile.placement
  • .github/workflows/pre.yml
  • .github/workflows/post.yml
  • deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml
  • build/Dockerfile.registration-operator
  • build/Dockerfile.registration
  • go.mod
  • deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml
  • .github/workflows/e2e.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: integration
  • GitHub Check: unit
  • GitHub Check: e2e-singleton
  • GitHub Check: e2e
  • GitHub Check: e2e-hosted
🔇 Additional comments (3)
development.md (1)

29-29: LGTM: Documentation updates are consistent.

The Go version updates in the documentation are correctly formatted and consistent across both the Key Technologies and Prerequisites sections.

Also applies to: 39-39

.github/workflows/releaseimage.yml (1)

9-9: Go 1.25 is production-ready and stable for use.

Go 1.25 was released in August 2025, making it mature and well-tested. The release maintains the Go 1 promise of compatibility, and we expect almost all Go programs to continue to compile and run as before. Multiple patch releases have been published (1.25.5 released December 2, 2025), indicating active maintenance.

However, be aware of key behavioral changes:

  • GOMAXPROCS default behavior changed: on Linux, the runtime now considers the CPU bandwidth limit of cgroups, and will default to the lower limit if it's less than logical CPUs.
  • A compiler bug from Go 1.21-1.24 that delayed nil pointer checks is now fixed—programs that incorrectly accessed nil values will now panic correctly.
  • The compiler and linker now generate DWARF version 5 debug information by default, reducing binary debug size.
build/Dockerfile.addon (1)

1-1: Confirmed: Bookworm upgrade is consistent across all build Dockerfiles.

The dual upgrade to Go 1.25 and Debian Bookworm is intentional and already applied uniformly—all five build Dockerfiles (addon, placement, registration, registration-operator, work) were updated together in a single commit. No partial upgrades or bullseye references remain.

The main remaining concern: validate ubi9/ubi-minimal runtime compatibility, as the multi-stage build compiles with Bookworm (with potentially different glibc) but runs on ubi9. Ensure the compiled binary's glibc dependency aligns with ubi9/ubi-minimal's version before deployment.

The reference to api/sdk-go/addon-framework updates could not be verified—confirm this external dependency compatibility separately if applicable.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@haoqing0110 haoqing0110 changed the title Upgrade to Go 1.25.0 🌱 Upgrade to Go 1.25.0 Dec 12, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/post.yml (1)

16-16: Go version updated correctly; verify actions/setup-go handles minor-only version.

The GO_VERSION environment variable is properly updated to '1.25' and correctly used in both the coverage and images jobs. Verify that the minor-only version string (without patch) correctly resolves to the latest Go 1.25.x patch version in the actions/setup-go@v6 action.

Additionally, note that GO_REQUIRED_MIN_VERSION on line 17 is empty. If minimum version enforcement is desired (e.g., to catch accidental downgrades in CI runs), consider setting it to '1.25' to match the primary GO_VERSION.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c35dd58 and 97558a4.

⛔ Files ignored due to path filters (1)
  • build/Dockerfile.work is excluded by !**/*.work
📒 Files selected for processing (11)
  • .github/workflows/cloudevents-integration.yml (1 hunks)
  • .github/workflows/e2e.yml (1 hunks)
  • .github/workflows/post.yml (1 hunks)
  • .github/workflows/pre.yml (1 hunks)
  • .github/workflows/releaseimage.yml (1 hunks)
  • build/Dockerfile.addon (1 hunks)
  • build/Dockerfile.placement (1 hunks)
  • build/Dockerfile.registration (1 hunks)
  • build/Dockerfile.registration-operator (1 hunks)
  • development.md (2 hunks)
  • go.mod (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-07-02T05:42:41.749Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1058
File: pkg/server/services/work/work.go:39-49
Timestamp: 2025-07-02T05:42:41.749Z
Learning: In the OCM (Open Cluster Management) codebase, nil checks with panic statements in constructor functions for interface parameters are considered unnecessary, as the dependency injection/wiring is managed properly and such checks are not part of the established codebase patterns.

Applied to files:

  • go.mod
📚 Learning: 2025-06-26T00:34:09.815Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1046
File: manifests/cluster-manager/hub/cluster-manager-clusterprofiles-clusterrole.yaml:5-10
Timestamp: 2025-06-26T00:34:09.815Z
Learning: The open-cluster-management-io/ocm codebase uses Go templates (text/template), not Helm templates. The standard pattern for dynamic labels in manifests is: `{{ if gt (len .Labels) 0 }}{{ range $key, $value := .Labels }}"{{ $key }}": "{{ $value }}"{{ end }}{{ end }}`. Do not suggest Helm-specific functions like `toYaml` for this codebase.

Applied to files:

  • go.mod
📚 Learning: 2025-07-23T10:10:42.066Z
Learnt from: skeeey
Repo: open-cluster-management-io/ocm PR: 1086
File: test/integration/util/grpc.go:146-146
Timestamp: 2025-07-23T10:10:42.066Z
Learning: In OCM codebase, there are two different GRPCServerOptions types: the local one in pkg/server/grpc/options.go (which only has GRPCServerConfig field) and the SDK one from open-cluster-management.io/sdk-go/pkg/cloudevents/server/grpc/options (which has ServerBindPort and other fields with default values). Test code uses the SDK version via grpcoptions import alias.

Applied to files:

  • go.mod
📚 Learning: 2025-06-26T00:33:09.311Z
Learnt from: zhiweiyin318
Repo: open-cluster-management-io/ocm PR: 1046
File: manifests/cluster-manager/hub/cluster-manager-clusterprofiles-clusterrolebinding.yaml:5-10
Timestamp: 2025-06-26T00:33:09.311Z
Learning: The OCM (Open Cluster Management) project uses Go templates for Kubernetes manifest generation, not Helm templates. Functions like `toYaml` that are available in Helm are not available in Go templates. The correct Go template syntax for iterating over labels is `{{ range $key, $value := .Labels }}` followed by `"{{ $key }}": "{{ $value }}"`.

Applied to files:

  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: verify PR contents
  • GitHub Check: unit
  • GitHub Check: verify
  • GitHub Check: integration
  • GitHub Check: build
🔇 Additional comments (10)
build/Dockerfile.registration-operator (1)

1-1: Base image version updated correctly.

The builder stage base image is upgraded from golang:1.24-bullseye to golang:1.25-bullseye. The change is isolated to the base image layer; all subsequent build steps remain unchanged and correct.

build/Dockerfile.placement (1)

1-1: Base image version updated correctly.

The builder stage base image is upgraded to golang:1.25-bullseye. The change is consistent with the registration-operator Dockerfile update and does not affect the build logic or final runtime configuration.

development.md (1)

29-29: Documentation version references updated consistently.

Both occurrences of the Go version in the development guide (line 29 in Key Technologies and line 39 in Prerequisites) are updated from 1.24.0 to 1.25.0, aligning with the module directive and CI/CD workflow changes.

Also applies to: 39-39

.github/workflows/e2e.yml (1)

18-18: GO_VERSION environment variable updated correctly.

The environment variable is updated to 1.25 and is correctly referenced across all three E2E test job definitions (lines 37, 75, 113). The use of a centralized environment variable ensures consistency across the workflow.

.github/workflows/releaseimage.yml (1)

9-9: GO_VERSION environment variable updated for release workflow.

The version is updated to 1.25 and is correctly referenced in the setup-go action (lines 58-60) for both the images and image-manifest jobs. The centralized environment variable definition ensures consistency across the release pipeline.

go.mod (1)

3-3: Module Go directive updated to 1.25.0.

The go directive is correctly updated from 1.24.0 to 1.25.0. This sets the minimum Go version requirement for the module. All dependencies remain unchanged, which aligns with the scope of this version upgrade.

Verify that all current dependencies in go.mod are compatible with Go 1.25.0. You can run go mod tidy && go build ./cmd/... locally to ensure there are no compatibility issues with the new Go version.

.github/workflows/pre.yml (1)

16-16: GO_VERSION environment variable updated consistently.

The version is updated to 1.25 and is correctly referenced across all four jobs (verify, build, unit, integration) at lines 32, 49, 62, and 84. The centralized environment variable ensures consistency across all pre-merge checks.

.github/workflows/cloudevents-integration.yml (1)

15-15: GO_VERSION environment variable updated for CloudEvents integration.

The version is updated to 1.25 and is correctly referenced in both integration test jobs (lines 31 and 44). The update aligns with the rest of the CI/CD infrastructure.

build/Dockerfile.registration (1)

1-1: Verify golang:1.25-bullseye image availability and stability.

The builder image has been correctly updated to Go 1.25. Ensure the golang:1.25-bullseye image is available on Docker Hub and suitable for the build process, especially when building for both amd64 and arm64 architectures (as seen in the CI workflows).

build/Dockerfile.addon (1)

1-1: Go builder image updated consistently; verify availability.

The builder image is correctly updated to Go 1.25 in line with the changes across all Dockerfiles (registration, registration-operator, placement, work) in this PR. Confirm that golang:1.25-bullseye is available on Docker Hub and functional for both amd64 and arm64 architectures.

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.22%. Comparing base (78daf0d) to head (950b751).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1296      +/-   ##
==========================================
- Coverage   62.23%   62.22%   -0.02%     
==========================================
  Files         209      209              
  Lines       17052    17052              
==========================================
- Hits        10613    10611       -2     
- Misses       5319     5320       +1     
- Partials     1120     1121       +1     
Flag Coverage Δ
unit 62.22% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qiujian16
Copy link
Member

@haoqing0110 api/sdk-go/addon-framework would also need to be upgraded...

@haoqing0110
Copy link
Member Author

/hold

@haoqing0110
Copy link
Member Author

/unhold

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Qing Hao <qhao@redhat.com>
@haoqing0110
Copy link
Member Author

/assign @qiujian16

@qiujian16
Copy link
Member

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 16, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, qiujian16

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit f01915a into open-cluster-management-io:main Dec 16, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants